From: Jo-Philipp Wich Date: Sun, 11 Aug 2019 18:52:51 +0000 (+0200) Subject: luci-base: ui.js: UISelect: fix check for empty choices X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=43a8c12f04f949563b2ac0be2c46a4033a509596;p=project%2Fluci.git luci-base: ui.js: UISelect: fix check for empty choices Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/ui.js b/modules/luci-base/htdocs/luci-static/resources/ui.js index 11886b91fe..2a7c44ad89 100644 --- a/modules/luci-base/htdocs/luci-static/resources/ui.js +++ b/modules/luci-base/htdocs/luci-static/resources/ui.js @@ -207,7 +207,7 @@ var UICheckbox = UIElement.extend({ var UISelect = UIElement.extend({ __init__: function(value, choices, options) { - if (typeof(choices) != 'object') + if (!L.isObject(choices)) choices = {}; if (!Array.isArray(value))